<template>
  <div class="title-container flex-between">
    <div class="flex align-center">
      <svg-icon v-if="hasIcon" :icon-class="iconClass" class-name="title-icon"></svg-icon>
      <div class="title">{{ title }}</div>
    </div>
    <slot />
  </div>
</template>

<script>
import SvgIcon from '../svg-icon'
export default {
  name: 'BackstageTitle',
  components: {
    SvgIcon
  },
  props: {
    title: {
      type: String,
      default: '标题'
    },
    iconClass: {
      type: String,
      default: ''
    },
    hasIcon: {
      type: Boolean,
      default: true
    }
  },
  data () {
    return {

    }
  }
}
</script>

<style lang="scss" scoped>
.title{
  font-size: 18px;
  font-weight: 500;
  line-height: 25.2px;
}
</style>

